﻿Public Class FormSplash

    'Code de l'évènement paint (paint permet de dessiner une fenêtre)
    Private Sub FormSplash_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
        Dim intCenterX As Integer
        Dim intCenterY As Integer

        ' verifier la résolution de l'ecran et afficher l'image correspondante (QVGA: 320 x 240 & VGA: 480 x 640 )

        If Screen.PrimaryScreen.WorkingArea.Height < 321 Then
            intCenterX = (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - My.Resources.Images.Ecran_intro_QVGA.Width) / 2
            intCenterY = (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - My.Resources.Images.Ecran_intro_QVGA.Height) / 2

            e.Graphics.DrawImage(My.Resources.Images.Ecran_intro_QVGA, intCenterX, intCenterY)
        Else
            intCenterX = (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - My.Resources.Images.Ecran_intro.Width) / 2
            intCenterY = (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - My.Resources.Images.Ecran_intro.Height) / 2

            e.Graphics.DrawImage(My.Resources.Images.Ecran_intro, intCenterX, intCenterY)
        End If


        'récupère le centre de l'écran du device
        


    End Sub
End Class